package com.vcredit.creditcat.manager.income;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.vcredit.creditcat.api.IMyIncomeManager;
import com.vcredit.creditcat.dto.income.MyIncomeDto;
import com.vcredit.creditcat.service.income.MyIncomeService;

/**
 * @description: ${todo} (描述这个文件的作用) Project Name:credit_cat File
 *               Name:MyIncomeManager.java Copyright (c) 2017/8/10 @author: 张新功
 *               Inc.All Rights Reserved.
 */
@Service(protocol = { "protocol1" }, version = "1.0")
public class MyIncomeManager implements IMyIncomeManager {
	
	@Autowired
	private MyIncomeService myIncomeService;

	@Override
	public List<MyIncomeDto> listIncome(Long custId) {
		return myIncomeService.listIncome(custId);
	}

	/**
	 * 領取收益
	 * @throws Exception 
	 */
	@Override
	public void drawIncome(Long incomeLogId,Long custId) throws Exception {
		myIncomeService.drawIncome(incomeLogId,custId);
	}
	
	@Override
	public BigDecimal getAccumulatedIncome(Long custId){
		  return myIncomeService.getAccumulatedIncome(custId);
	}

}
